/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package view;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import util.MyLookAndFeel;

/**
 *
 * @author K u Ku
 */
public class frmTrainningCenter extends javax.swing.JFrame {

    public String fullname;
    /**
     * Creates new form frmTrainningCenter
     */
    public frmTrainningCenter() {
        initComponents();
        initUI();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlContent = new javax.swing.JPanel();
        tabControl = new javax.swing.JTabbedPane();
        pnlMenu = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        pnlCategory = new javax.swing.JPanel();
        jToolBar1 = new javax.swing.JToolBar();
        btnStudent = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        btnTeacher = new javax.swing.JButton();
        btnCourse = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btnRoom = new javax.swing.JButton();
        btnShift = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JToolBar.Separator();
        btnUser = new javax.swing.JButton();
        jSeparator4 = new javax.swing.JToolBar.Separator();
        btnBill = new javax.swing.JButton();
        pnlFunction = new javax.swing.JPanel();
        pnlReport = new javax.swing.JPanel();
        pnlSystem = new javax.swing.JPanel();
        pnlHelp = new javax.swing.JPanel();
        pnlBottom = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        lblFullName = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMaximumSize(new java.awt.Dimension(2147483647, 600));
        setMinimumSize(new java.awt.Dimension(900, 600));
        setPreferredSize(new java.awt.Dimension(900, 600));

        pnlContent.setLayout(new java.awt.BorderLayout());
        pnlContent.add(tabControl, java.awt.BorderLayout.CENTER);

        getContentPane().add(pnlContent, java.awt.BorderLayout.CENTER);

        pnlMenu.setPreferredSize(new java.awt.Dimension(900, 100));
        pnlMenu.setLayout(new java.awt.BorderLayout());

        pnlCategory.setLayout(new java.awt.BorderLayout());

        jToolBar1.setBackground(new java.awt.Color(255, 255, 255));
        jToolBar1.setRollover(true);

        btnStudent.setBackground(new java.awt.Color(255, 255, 255));
        btnStudent.setText("Student");
        btnStudent.setFocusable(false);
        btnStudent.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnStudent.setMaximumSize(new java.awt.Dimension(50, 55));
        btnStudent.setMinimumSize(new java.awt.Dimension(50, 55));
        btnStudent.setPreferredSize(new java.awt.Dimension(60, 55));
        btnStudent.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnStudent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnStudentActionPerformed(evt);
            }
        });
        jToolBar1.add(btnStudent);
        jToolBar1.add(jSeparator2);

        btnTeacher.setBackground(new java.awt.Color(255, 255, 255));
        btnTeacher.setText("Teacher");
        btnTeacher.setFocusable(false);
        btnTeacher.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnTeacher.setMaximumSize(new java.awt.Dimension(50, 55));
        btnTeacher.setMinimumSize(new java.awt.Dimension(50, 55));
        btnTeacher.setPreferredSize(new java.awt.Dimension(60, 55));
        btnTeacher.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnTeacher.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTeacherActionPerformed(evt);
            }
        });
        jToolBar1.add(btnTeacher);

        btnCourse.setBackground(new java.awt.Color(255, 255, 255));
        btnCourse.setText("Course");
        btnCourse.setFocusable(false);
        btnCourse.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCourse.setMaximumSize(new java.awt.Dimension(50, 55));
        btnCourse.setMinimumSize(new java.awt.Dimension(50, 55));
        btnCourse.setPreferredSize(new java.awt.Dimension(50, 55));
        btnCourse.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnCourse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCourseActionPerformed(evt);
            }
        });
        jToolBar1.add(btnCourse);
        jToolBar1.add(jSeparator1);

        btnRoom.setBackground(new java.awt.Color(255, 255, 255));
        btnRoom.setText("Room");
        btnRoom.setFocusable(false);
        btnRoom.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnRoom.setMaximumSize(new java.awt.Dimension(50, 55));
        btnRoom.setMinimumSize(new java.awt.Dimension(50, 55));
        btnRoom.setPreferredSize(new java.awt.Dimension(50, 55));
        btnRoom.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnRoom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRoomActionPerformed(evt);
            }
        });
        jToolBar1.add(btnRoom);

        btnShift.setBackground(new java.awt.Color(255, 255, 255));
        btnShift.setText("Shift");
        btnShift.setFocusable(false);
        btnShift.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnShift.setMaximumSize(new java.awt.Dimension(50, 55));
        btnShift.setMinimumSize(new java.awt.Dimension(50, 55));
        btnShift.setPreferredSize(new java.awt.Dimension(50, 55));
        btnShift.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnShift.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnShiftActionPerformed(evt);
            }
        });
        jToolBar1.add(btnShift);
        jToolBar1.add(jSeparator3);

        btnUser.setBackground(new java.awt.Color(255, 255, 255));
        btnUser.setText("User");
        btnUser.setFocusable(false);
        btnUser.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnUser.setMaximumSize(new java.awt.Dimension(50, 55));
        btnUser.setMinimumSize(new java.awt.Dimension(50, 55));
        btnUser.setPreferredSize(new java.awt.Dimension(50, 55));
        btnUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUserActionPerformed(evt);
            }
        });
        jToolBar1.add(btnUser);
        jToolBar1.add(jSeparator4);

        btnBill.setBackground(new java.awt.Color(255, 255, 255));
        btnBill.setText("Bill");
        btnBill.setFocusable(false);
        btnBill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBill.setMaximumSize(new java.awt.Dimension(50, 55));
        btnBill.setMinimumSize(new java.awt.Dimension(50, 55));
        btnBill.setPreferredSize(new java.awt.Dimension(50, 55));
        btnBill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBill.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBillActionPerformed(evt);
            }
        });
        jToolBar1.add(btnBill);

        pnlCategory.add(jToolBar1, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Category", pnlCategory);

        javax.swing.GroupLayout pnlFunctionLayout = new javax.swing.GroupLayout(pnlFunction);
        pnlFunction.setLayout(pnlFunctionLayout);
        pnlFunctionLayout.setHorizontalGroup(
            pnlFunctionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        pnlFunctionLayout.setVerticalGroup(
            pnlFunctionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 72, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Function", pnlFunction);

        javax.swing.GroupLayout pnlReportLayout = new javax.swing.GroupLayout(pnlReport);
        pnlReport.setLayout(pnlReportLayout);
        pnlReportLayout.setHorizontalGroup(
            pnlReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        pnlReportLayout.setVerticalGroup(
            pnlReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 72, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Report", pnlReport);

        javax.swing.GroupLayout pnlSystemLayout = new javax.swing.GroupLayout(pnlSystem);
        pnlSystem.setLayout(pnlSystemLayout);
        pnlSystemLayout.setHorizontalGroup(
            pnlSystemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        pnlSystemLayout.setVerticalGroup(
            pnlSystemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 72, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("System", pnlSystem);

        javax.swing.GroupLayout pnlHelpLayout = new javax.swing.GroupLayout(pnlHelp);
        pnlHelp.setLayout(pnlHelpLayout);
        pnlHelpLayout.setHorizontalGroup(
            pnlHelpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 895, Short.MAX_VALUE)
        );
        pnlHelpLayout.setVerticalGroup(
            pnlHelpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 72, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Help", pnlHelp);

        pnlMenu.add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        getContentPane().add(pnlMenu, java.awt.BorderLayout.PAGE_START);

        pnlBottom.setPreferredSize(new java.awt.Dimension(900, 30));
        pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        jLabel1.setBackground(new java.awt.Color(0, 102, 153));
        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 102, 204));
        jLabel1.setText("Wellcome, ");
        pnlBottom.add(jLabel1);

        lblFullName.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        lblFullName.setForeground(new java.awt.Color(255, 204, 0));
        lblFullName.setText("FullName");
        pnlBottom.add(lblFullName);

        getContentPane().add(pnlBottom, java.awt.BorderLayout.PAGE_END);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUserActionPerformed
        tabControl.removeAll();
        tabControl.addTab("User", new pnlUser(tabControl));
    }//GEN-LAST:event_btnUserActionPerformed

    private void btnBillActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBillActionPerformed
//        tabControl.addTab("Bill", new pnlBill(tabControl));
    }//GEN-LAST:event_btnBillActionPerformed

    private void btnStudentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStudentActionPerformed
        tabControl.removeAll();
        tabControl.addTab("Student", new pnlStudent());
    }//GEN-LAST:event_btnStudentActionPerformed

    private void btnTeacherActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTeacherActionPerformed
        tabControl.removeAll();
        tabControl.addTab("Teacher", new pnlTeacher());
    }//GEN-LAST:event_btnTeacherActionPerformed

    private void btnCourseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCourseActionPerformed
        tabControl.removeAll();
        pnlCourse p = new pnlCourse(tabControl);
        tabControl.addTab("Course", p);
    }//GEN-LAST:event_btnCourseActionPerformed

    private void btnRoomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRoomActionPerformed
        tabControl.removeAll();
        tabControl.addTab("Room", new pnlRoom());
    }//GEN-LAST:event_btnRoomActionPerformed

    private void btnShiftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnShiftActionPerformed
        tabControl.removeAll();
        tabControl.addTab("Shift", new pnlShift());
    }//GEN-LAST:event_btnShiftActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        util.MyLookAndFeel.GetLookAndFeelWindow();
        
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new frmTrainningCenter().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBill;
    private javax.swing.JButton btnCourse;
    private javax.swing.JButton btnRoom;
    private javax.swing.JButton btnShift;
    private javax.swing.JButton btnStudent;
    private javax.swing.JButton btnTeacher;
    private javax.swing.JButton btnUser;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar.Separator jSeparator3;
    private javax.swing.JToolBar.Separator jSeparator4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JLabel lblFullName;
    private javax.swing.JPanel pnlBottom;
    private javax.swing.JPanel pnlCategory;
    private javax.swing.JPanel pnlContent;
    private javax.swing.JPanel pnlFunction;
    private javax.swing.JPanel pnlHelp;
    private javax.swing.JPanel pnlMenu;
    private javax.swing.JPanel pnlReport;
    private javax.swing.JPanel pnlSystem;
    private javax.swing.JTabbedPane tabControl;
    // End of variables declaration//GEN-END:variables
    public void initUI(){
        setLocationRelativeTo(null);
        lblFullName.setText(view.dlgLogin.fullName);
    }


}
